/**
  * <p><code>QIntic</code> QIntic easing function, adopted from robertpenner.com.</p>
  * 
  * This software is derived from code bearing the copyright notice,
	*
	* Copyright © 2001 Robert Penner
  * All rights reserved.
  *
  * and governed by terms of use at http://www.robertpenner.com/easing_terms_of_use.html
  * 
  * @version 1.0
 	*
  * 
  */

package singularity.easing;

  class QIntic extends Easing {
    
    public function new()
    {
      super();
      
      __type = Easing.QIntIC;
    }
    
	  public override function easeIn (t:Float, b:Float, c:Float, d:Float, ?optional1:Float=0, ?optional2:Float=0):Float 
	  {
		  return c*(t/=d)*t*t*t*t + b;
	  }
	   
	  public override function easeOut (t:Float, b:Float, c:Float, d:Float, ?optional1:Float=0, ?optional2:Float=0):Float 
	  {
		  return c*((t=t/d-1)*t*t*t*t + 1) + b;
	  }
	   
	  public override function easeInOut (t:Float, b:Float, c:Float, d:Float, ?optional1:Float=0, ?optional2:Float=0):Float 
	  {
		  if( (t/=d/2) < 1 ) 
		  {
		    return c/2*t*t*t*t*t + b;
		  }
		    
		  return c/2*((t-=2)*t*t*t*t + 2) + b;
	  }
	}
